package com.itheima.d1_polymorphism;
/*
    目标：掌握使用多态的好处，以及多态下的类型转换问题。
 */
public class Test2 {
    public static void main(String[] args) {
        People p1 = new Teacher();
        Student s  = new Student();
        testRun(s);
        Teacher t = new Teacher();
        testRun(t);
    }
    public static void testRun(People s) {
        System.out.println("计时开始");
        s.run();
        System.out.println("计时结束");
    }



}
